
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Web性能测试工具 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="../运维相关.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../开源组件实现.html">
            
                <a href="../开源组件实现.html">
            
                    
                    开源组件实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../mvc/MVC框架实现篇.html">
            
                <a href="../mvc/MVC框架实现篇.html">
            
                    
                    MVC框架实现篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="../mvc/">
            
                <a href="../mvc/">
            
                    
                    MVC框架实现篇
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="../mvc/1.plan.html">
            
                <a href="../mvc/1.plan.html">
            
                    
                    项目规划
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="../mvc/2.route.html">
            
                <a href="../mvc/2.route.html">
            
                    
                    路由设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.4" data-path="../mvc/3.controller.html">
            
                <a href="../mvc/3.controller.html">
            
                    
                    控制器设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.5" data-path="../mvc/4.config.html">
            
                <a href="../mvc/4.config.html">
            
                    
                    配置设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.6" data-path="../mvc/5.view.html">
            
                <a href="../mvc/5.view.html">
            
                    
                    视图设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.7" data-path="../mvc/6.dbutil.html">
            
                <a href="../mvc/6.dbutil.html">
            
                    
                    数据库操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.8" data-path="../mvc/7.crud.html">
            
                <a href="../mvc/7.crud.html">
            
                    
                    增删改查
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../ioc/IOC容器实现篇.html">
            
                <a href="../ioc/IOC容器实现篇.html">
            
                    
                    IOC容器实现篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../ioc/1.concept.html">
            
                <a href="../ioc/1.concept.html">
            
                    
                    IOC的概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="../ioc/2.spring.html">
            
                <a href="../ioc/2.spring.html">
            
                    
                    Spring中怎么用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="../ioc/3.myioc.html">
            
                <a href="../ioc/3.myioc.html">
            
                    
                    设计一个IOC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.4" data-path="../ioc/4.principle.html">
            
                <a href="../ioc/4.principle.html">
            
                    
                    原理分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../设计模式系列.html">
            
                <a href="../设计模式系列.html">
            
                    
                    设计模式系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../designpatterns/singleton.html">
            
                <a href="../designpatterns/singleton.html">
            
                    
                    如何正确地写出单例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../designpatterns/proxy.html">
            
                <a href="../designpatterns/proxy.html">
            
                    
                    代理模式剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../designpatterns/strategy.html">
            
                <a href="../designpatterns/strategy.html">
            
                    
                    什么是策略模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Java8系列.html">
            
                <a href="../Java8系列.html">
            
                    
                    Java8系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../java8/java8-guide.html">
            
                <a href="../java8/java8-guide.html">
            
                    
                    Java8简明教程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../java8/foreach.html">
            
                <a href="../java8/foreach.html">
            
                    
                    Java8 Foreach
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Hexo搭建博客.html">
            
                <a href="../Hexo搭建博客.html">
            
                    
                    Hexo搭建博客
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../hexo/hello.html">
            
                <a href="../hexo/hello.html">
            
                    
                    分分钟部署一个Hexo环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../hexo/config.html">
            
                <a href="../hexo/config.html">
            
                    
                    各种配置详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../hexo/writing.html">
            
                <a href="../hexo/writing.html">
            
                    
                    开始写作吧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../开发者指南.html">
            
                <a href="../开发者指南.html">
            
                    
                    开发者指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../git/guide.html">
            
                <a href="../git/guide.html">
            
                    
                    git - 简明指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" >
            
                <a target="_blank" href="https://waylau.gitbooks.io/jersey-2-user-guide/content/index.html">
            
                    
                    Jersey-2.x用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" >
            
                <a target="_blank" href="https://waylau.gitbooks.io/rest-in-action/content/">
            
                    
                    REST 实战
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" >
            
                <a target="_blank" href="https://github.com/waylau/servlet-3.1-specification">
            
                    
                    Java Servlet 3.1 规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" >
            
                <a target="_blank" href="http://mybatis.github.io/mybatis-3/zh/index.html">
            
                    
                    MyBatis中文指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" >
            
                <a target="_blank" href="https://github.com/waylau/apache-shiro-1.2.x-reference">
            
                    
                    Apache Shiro 用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" >
            
                <a target="_blank" href="https://github.com/qibaoguang/Spring-Boot-Reference-Guide/blob/master/SUMMARY.md">
            
                    
                    Spring Boot参考指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" >
            
                <a target="_blank" href="https://github.com/waylau/netty-4-user-guide/blob/master/SUMMARY.md">
            
                    
                    Netty4 用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="../user_guide/google-java8-guide.html">
            
                <a href="../user_guide/google-java8-guide.html">
            
                    
                    Google Java编程风格指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../运维相关.html">
            
                <a href="../运维相关.html">
            
                    
                    运维相关
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.7.1" data-path="test_tool.html">
            
                <a href="test_tool.html">
            
                    
                    Web性能测试工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" >
            
                <a target="_blank" href="https://github.com/judasn/Linux-Tutorial">
            
                    
                    Java 程序员眼中的 Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../learn_server/">
            
                <a href="../learn_server/">
            
                    
                    写给java开发的运维笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../经典文章.html">
            
                <a href="../经典文章.html">
            
                    
                    经典文章
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../articles/request_message.html">
            
                <a href="../articles/request_message.html">
            
                    
                    HTTP请求报文解剖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../articles/software_architecture_patterns.html">
            
                <a href="../articles/software_architecture_patterns.html">
            
                    
                    软件架构模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../articles/electrical-business-architecture.html">
            
                <a href="../articles/electrical-business-architecture.html">
            
                    
                    电商网站架构案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../服务器相关.html">
            
                <a href="../服务器相关.html">
            
                    
                    服务器/域名/SSL证书
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://domainr.com">
            
                    
                    可用域名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" >
            
                <a target="_blank" href="http://hk.hostsir.com/Affiliates/i/d/976">
            
                    
                    优惠域名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" >
            
                <a target="_blank" href="http://www.vultr.com/?ref=6886447">
            
                    
                    vultr VPS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" >
            
                <a target="_blank" href="https://sshdropbear.net/">
            
                    
                    免费VPN/SSH服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" >
            
                <a target="_blank" href="http://get.ishadow.website/">
            
                    
                    免费SS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.6" >
            
                <span>
            
                    
                    1小时免费VPN
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.7" >
            
                <a target="_blank" href="https://saki.ssl.do/aff.php?aff=11">
            
                    
                    SSL.DO
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.8" >
            
                <a target="_blank" href="http://api.hostinger.com.hk/redir/22018310">
            
                    
                    免费虚拟主机
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../实用工具.html">
            
                <a href="../实用工具.html">
            
                    
                    实用工具/API
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" >
            
                <a target="_blank" href="https://tinypng.com/">
            
                    
                    PNG图片无损压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" >
            
                <a target="_blank" href="http://tool.c7sky.com/image-watermark/">
            
                    
                    在线给图片加水印
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" >
            
                <a target="_blank" href="http://tool.c7sky.com/password/">
            
                    
                    随机密码生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" >
            
                <a target="_blank" href="https://randomuser.me/">
            
                    
                    随机头像生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" >
            
                <a target="_blank" href="http://tool.c7sky.com/tcleaner/">
            
                    
                    微博一键清理工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" >
            
                <a target="_blank" href="http://csscompressor.com/">
            
                    
                    CSS压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" >
            
                <a target="_blank" href="http://www.atool.org/">
            
                    
                    在线工具
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Web性能测试工具</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="web&#x670D;&#x52A1;&#x5668;&#x6027;&#x80FD;&#x538B;&#x529B;&#x6D4B;&#x8BD5;&#x5DE5;&#x5177;">Web&#x670D;&#x52A1;&#x5668;&#x6027;&#x80FD;&#x538B;&#x529B;&#x6D4B;&#x8BD5;&#x5DE5;&#x5177;</h1>
<h2 id="&#x76EE;&#x5F55;">&#x76EE;&#x5F55;</h2>
<ul>
<li><a href="#http_load">http_load</a></li>
<li><a href="#webbench">webbench</a></li>
<li><a href="#ab">ab</a></li>
<li><a href="#siege">siege</a></li>
</ul>
<h3 id="httpload">http_load</h3>
<p>&#x7A0B;&#x5E8F;&#x975E;&#x5E38;&#x5C0F;&#xFF0C;&#x89E3;&#x538B;&#x540E;&#x4E5F;&#x4E0D;&#x5230;100K
http_load&#x4EE5;&#x5E76;&#x884C;&#x590D;&#x7528;&#x7684;&#x65B9;&#x5F0F;&#x8FD0;&#x884C;&#xFF0C;&#x7528;&#x4EE5;&#x6D4B;&#x8BD5;web&#x670D;&#x52A1;&#x5668;&#x7684;&#x541E;&#x5410;&#x91CF;&#x4E0E;&#x8D1F;&#x8F7D;&#x3002;
&#x4F46;&#x662F;&#x5B83;&#x4E0D;&#x540C;&#x4E8E;&#x5927;&#x591A;&#x6570;&#x538B;&#x529B;&#x6D4B;&#x8BD5;&#x5DE5;&#x5177;&#xFF0C;&#x5B83;&#x53EF;&#x4EE5;&#x4EE5;&#x4E00;&#x4E2A;&#x5355;&#x4E00;&#x7684;&#x8FDB;&#x7A0B;&#x8FD0;&#x884C;&#xFF0C;&#x4E00;&#x822C;&#x4E0D;&#x4F1A;&#x628A;&#x5BA2;&#x6237;&#x673A;&#x641E;&#x6B7B;&#x3002;
&#x8FD8;&#x53EF;&#x4EE5;&#x6D4B;&#x8BD5;HTTPS&#x7C7B;&#x7684;&#x7F51;&#x7AD9;&#x8BF7;&#x6C42;&#x3002;
&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A;<a href="http://acme.com/software/http_load/http_load-12mar2006.tar.gz" target="_blank">http_load-12mar2006.tar.gz</a></p>
<blockquote>
<p>&#x5B89;&#x88C5;&#x5F88;&#x7B80;&#x5355;</p>
</blockquote>
<pre><code class="lang-sh">tar zxvf http_load-12mar2006.tar.gz
<span class="hljs-built_in">cd</span> http_load-12mar2006
make &amp;&amp; make install
</code></pre>
<blockquote>
<p>&#x57FA;&#x672C;&#x7528;&#x6CD5;&#xFF1A;</p>
</blockquote>
<pre><code class="lang-sh">http_load  -p &#x5E76;&#x53D1;&#x8BBF;&#x95EE;&#x8FDB;&#x7A0B;&#x6570;  <span class="hljs-_">-s</span> &#x8BBF;&#x95EE;&#x65F6;&#x95F4;  &#x9700;&#x8981;&#x8BBF;&#x95EE;&#x7684;URL&#x6587;&#x4EF6;
</code></pre>
<p>&#x53C2;&#x6570;&#x5176;&#x5B9E;&#x53EF;&#x4EE5;&#x81EA;&#x7531;&#x7EC4;&#x5408;&#xFF0C;&#x53C2;&#x6570;&#x4E4B;&#x95F4;&#x7684;&#x9009;&#x62E9;&#x5E76;&#x6CA1;&#x6709;&#x4EC0;&#x4E48;&#x9650;&#x5236;&#x3002;
&#x6BD4;&#x5982;&#x4F60;&#x5199;&#x6210; <code>http_load  -parallel  5  -seconds  300  urllist.txt</code> &#x4E5F;&#x662F;&#x53EF;&#x4EE5;&#x7684;&#x3002;
&#x6211;&#x4EEC;&#x628A;&#x53C2;&#x6570;&#x7ED9;&#x5927;&#x5BB6;&#x7B80;&#x5355;&#x8BF4;&#x660E;&#x4E00;&#x4E0B;&#x3002;
<code>-parallel</code>   &#x7B80;&#x5199;-p &#xFF1A;&#x542B;&#x4E49;&#x662F;&#x5E76;&#x53D1;&#x7684;&#x7528;&#x6237;&#x8FDB;&#x7A0B;&#x6570;&#x3002;
<code>-fetches</code>   &#x7B80;&#x5199;-f &#xFF1A;&#x542B;&#x4E49;&#x662F;&#x603B;&#x8BA1;&#x7684;&#x8BBF;&#x95EE;&#x6B21;&#x6570;
<code>-rate</code>    &#x7B80;&#x5199;-p &#xFF1A;&#x542B;&#x4E49;&#x662F;&#x6BCF;&#x79D2;&#x7684;&#x8BBF;&#x95EE;&#x9891;&#x7387;
<code>-seconds</code> &#x7B80;&#x5199;-s &#xFF1A;&#x542B;&#x4E49;&#x662F;&#x603B;&#x8BA1;&#x7684;&#x8BBF;&#x95EE;&#x65F6;&#x95F4;</p>
<p>&#x51C6;&#x5907;URL&#x6587;&#x4EF6;&#xFF1A;<code>urllist.txt</code>&#xFF0C;&#x6587;&#x4EF6;&#x683C;&#x5F0F;&#x662F;&#x6BCF;&#x884C;&#x4E00;&#x4E2A;URL&#xFF0C;URL&#x6700;&#x597D;&#x8D85;&#x8FC7;50&#xFF0D;100&#x4E2A;&#x6D4B;&#x8BD5;&#x6548;&#x679C;&#x6BD4;&#x8F83;&#x597D;&#x3002;</p>
<blockquote>
<p>&#x6587;&#x4EF6;&#x683C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
</blockquote>
<pre><code class="lang-sh">http://www.domain.com/
http://www.domain.com/blog/
http://www.domain.com/signin/
http://www.domain.com/signup/
http://www.domain.com/article/1.html
http://www.domain.com/article/2.html
http://www.domain.com/article/3.html
http://www.domain.com/article/4.html
http://www.domain.com/article/5.html
http://www.domain.com/article/6.html
http://www.domain.com/article/7.html
</code></pre>
<blockquote>
<p>&#x4F8B;&#x5982;&#xFF1A;</p>
</blockquote>
<pre><code class="lang-sh">http_load -p 30 <span class="hljs-_">-s</span> 60  urllist.txt
</code></pre>
<p>&#x53C2;&#x6570;&#x4E86;&#x89E3;&#x4E86;&#xFF0C;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x8FD0;&#x884C;&#x4E00;&#x6761;&#x547D;&#x4EE4;&#x6765;&#x770B;&#x770B;&#x5B83;&#x7684;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><img src="http://i.imgur.com/ZT37WJg.png" alt=""></p>
<blockquote>
<p>&#x7ED3;&#x679C;&#x5206;&#x6790;&#xFF1A;</p>
</blockquote>
<ol>
<li>294 fetches, 30 max parallel, 3.83835e+06 bytes, in 60.0026 seconds
&#x8BF4;&#x660E;&#x5728;&#x4E0A;&#x9762;&#x7684;&#x6D4B;&#x8BD5;&#x4E2D;&#x8FD0;&#x884C;&#x4E86;294&#x4E2A;&#x8BF7;&#x6C42;&#xFF0C;&#x6700;&#x5927;&#x7684;&#x5E76;&#x53D1;&#x8FDB;&#x7A0B;&#x6570;&#x662F;30&#xFF0C;&#x603B;&#x8BA1;&#x4F20;&#x8F93;&#x7684;&#x6570;&#x636E;&#x662F;3.83835e+06bytes&#xFF0C;&#x8FD0;&#x884C;&#x7684;&#x65F6;&#x95F4;&#x662F;60.0026&#x79D2;</li>
<li>13055.6 mean bytes/connection
&#x8BF4;&#x660E;&#x6BCF;&#x4E00;&#x8FDE;&#x63A5;&#x5E73;&#x5747;&#x4F20;&#x8F93;&#x7684;&#x6570;&#x636E;&#x91CF;3.83835e+06/294=13055.6</li>
<li>4.89979 fetches/sec, 63969.7 bytes/sec
&#x8BF4;&#x660E;&#x6BCF;&#x79D2;&#x7684;&#x54CD;&#x5E94;&#x8BF7;&#x6C42;&#x4E3A;4.89979&#xFF0C;&#x6BCF;&#x79D2;&#x4F20;&#x9012;&#x7684;&#x6570;&#x636E;&#x4E3A;63969.7 bytes/sec</li>
<li>msecs/connect: 312.009 mean, 1319.57 max, 209.994 min
&#x8BF4;&#x660E;&#x6BCF;&#x8FDE;&#x63A5;&#x7684;&#x5E73;&#x5747;&#x54CD;&#x5E94;&#x65F6;&#x95F4;&#x662F;312.009 msecs&#xFF0C;&#x6700;&#x5927;&#x7684;&#x54CD;&#x5E94;&#x65F6;&#x95F4;1319.57 msecs&#xFF0C;&#x6700;&#x5C0F;&#x7684;&#x54CD;&#x5E94;&#x65F6;&#x95F4;209.994 msecs</li>
<li>msecs/first-response: 1191.01 mean, 10212.4 max, 220.78 min</li>
<li>HTTP response codes: 
 code 200  --  127 
 code 502  --  166
&#x8BF4;&#x660E;&#x6253;&#x5F00;&#x54CD;&#x5E94;&#x9875;&#x9762;&#x7684;&#x7C7B;&#x578B;
&#x5982;&#x679C;403&#x7684;&#x7C7B;&#x578B;&#x8FC7;&#x591A;&#xFF0C;&#x90A3;&#x53EF;&#x80FD;&#x8981;&#x6CE8;&#x610F;&#x662F;&#x5426;&#x7CFB;&#x7EDF;&#x9047;&#x5230;&#x4E86;&#x74F6;&#x9888;&#x3002;</li>
</ol>
<p><strong>&#x7279;&#x6B8A;&#x8BF4;&#x660E;&#xFF1A;</strong></p>
<p>&#x6D4B;&#x8BD5;&#x7ED3;&#x679C;&#x4E2D;&#x4E3B;&#x8981;&#x7684;&#x6307;&#x6807;&#x662F; <code>fetches/sec</code>&#x3001;<code>msecs/connect</code> &#x8FD9;&#x4E2A;&#x9009;&#x9879;&#xFF0C;&#x5373;&#x670D;&#x52A1;&#x5668;&#x6BCF;&#x79D2;&#x80FD;&#x591F;&#x54CD;&#x5E94;&#x7684;&#x67E5;&#x8BE2;&#x6B21;&#x6570;&#x3002;
&#x7528;&#x8FD9;&#x4E2A;&#x6307;&#x6807;&#x6765;&#x8861;&#x91CF;&#x6027;&#x80FD;&#x3002;&#x4F3C;&#x4E4E;&#x6BD4;apache&#x7684;ab&#x51C6;&#x786E;&#x7387;&#x8981;&#x9AD8;&#x4E00;&#x4E9B;&#xFF0C;&#x4E5F;&#x66F4;&#x6709;&#x8BF4;&#x670D;&#x529B;&#x4E00;&#x4E9B;&#x3002;
<code>Qpt</code>-&#x6BCF;&#x79D2;&#x54CD;&#x5E94;&#x7528;&#x6237;&#x6570;&#x548C;response time&#xFF0C;&#x6BCF;&#x8FDE;&#x63A5;&#x54CD;&#x5E94;&#x7528;&#x6237;&#x65F6;&#x95F4;&#x3002;
&#x6D4B;&#x8BD5;&#x7684;&#x7ED3;&#x679C;&#x4E3B;&#x8981;&#x4E5F;&#x662F;&#x770B;&#x8FD9;&#x4E24;&#x4E2A;&#x503C;&#x3002;
&#x5F53;&#x7136;&#x4EC5;&#x6709;&#x8FD9;&#x4E24;&#x4E2A;&#x6307;&#x6807;&#x5E76;&#x4E0D;&#x80FD;&#x5B8C;&#x6210;&#x5BF9;&#x6027;&#x80FD;&#x7684;&#x5206;&#x6790;&#xFF0C;&#x6211;&#x4EEC;&#x8FD8;&#x9700;&#x8981;&#x5BF9;&#x670D;&#x52A1;&#x5668;&#x7684;<code>cpu</code>&#x3001;<code>men</code>&#x8FDB;&#x884C;&#x5206;&#x6790;&#xFF0C;&#x624D;&#x80FD;&#x5F97;&#x51FA;&#x7ED3;&#x8BBA;&#x3002;</p>
<h3 id="webbench">webbench</h3>
<p>webbench&#x662F;Linux&#x4E0B;&#x7684;&#x4E00;&#x4E2A;&#x7F51;&#x7AD9;&#x538B;&#x529B;&#x6D4B;&#x8BD5;&#x5DE5;&#x5177;&#xFF0C;&#x6700;&#x591A;&#x53EF;&#x4EE5;&#x6A21;&#x62DF;3&#x4E07;&#x4E2A;&#x5E76;&#x53D1;&#x8FDE;&#x63A5;&#x53BB;&#x6D4B;&#x8BD5;&#x7F51;&#x7AD9;&#x7684;&#x8D1F;&#x8F7D;&#x80FD;&#x529B;&#x3002;
&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#x53EF;&#x4EE5;&#x5230;google&#x641C;&#xFF0C;&#x6211;&#x8FD9;&#x91CC;&#x7ED9;&#x51FA;&#x4E00;&#x4E2A;
&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A;<a href="http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz" target="_blank">http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz</a>
&#x8FD9;&#x4E2A;&#x7A0B;&#x5E8F;&#x66F4;&#x5C0F;&#xFF0C;&#x89E3;&#x538B;&#x540E;&#x4E0D;&#x5230;50K&#xFF0C;&#x5475;&#x5475;
&#x5B89;&#x88C5;&#x975E;&#x5E38;&#x7B80;&#x5355;</p>
<pre><code class="lang-sh">tar zxvf webbench-1.5.tar.gz
<span class="hljs-built_in">cd</span> webbench-1.5
make &amp;&amp; make install
</code></pre>
<p>&#x4F1A;&#x5728;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x751F;&#x6210;webbench&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#xFF0C;&#x76F4;&#x63A5;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4E86;
&#x7528;&#x6CD5;&#xFF1A;webbench -c &#x5E76;&#x53D1;&#x6570; -t &#x8FD0;&#x884C;&#x6D4B;&#x8BD5;&#x65F6;&#x95F4; URL</p>
<blockquote>
<p>&#x4F8B;&#x5982;&#xFF1A;</p>
</blockquote>
<pre><code class="lang-sh">webbench -c 1000 -t 130 http://www.baidu.com
</code></pre>
<h3 id="ab">ab</h3>
<p>ab&#x662F;apache&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x6B3E;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684;&#x6D4B;&#x8BD5;&#x5DE5;&#x5177;&#x3002;
&#x5B89;&#x88C5;&#x4E86;apache&#x4E00;&#x822C;&#x5C31;&#x81EA;&#x5E26;&#x4E86;&#x3002;
&#x7528;&#x6CD5;&#x53EF;&#x4EE5;&#x67E5;&#x770B;&#x5B83;&#x7684;&#x8BF4;&#x660E;</p>
<pre><code class="lang-sh">./ab
</code></pre>
<p><img src="http://i.imgur.com/Zgtcmug.png" alt=""></p>
<p>&#x53C2;&#x6570;&#x4F17;&#x591A;&#xFF0C;&#x4E00;&#x822C;&#x6211;&#x4EEC;&#x7528;&#x5230;&#x7684;&#x662F; <code>-n</code> &#x548C; <code>-c</code></p>
<p>&#x4F8B;&#x5982;&#xFF1A;</p>
<pre><code class="lang-sh">webbench -c 1000 -t 130 http://www.baidu.com/index.php
</code></pre>
<p>&#x8FD9;&#x4E2A;&#x8868;&#x793A;&#x540C;&#x65F6;&#x5904;&#x7406;1000&#x4E2A;&#x8BF7;&#x6C42;&#x5E76;&#x8FD0;&#x884C;130&#x6B21;index.php&#x6587;&#x4EF6;&#x3002;</p>
<h3 id="siege">siege</h3>
<p>&#x4E00;&#x6B3E;&#x5F00;&#x6E90;&#x7684;&#x538B;&#x529B;&#x6D4B;&#x8BD5;&#x5DE5;&#x5177;&#xFF0C;&#x53EF;&#x4EE5;&#x6839;&#x636E;&#x914D;&#x7F6E;&#x5BF9;&#x4E00;&#x4E2A;WEB&#x7AD9;&#x70B9;&#x8FDB;&#x884C;&#x591A;&#x7528;&#x6237;&#x7684;&#x5E76;&#x53D1;&#x8BBF;&#x95EE;&#xFF0C;&#x8BB0;&#x5F55;&#x6BCF;&#x4E2A;&#x7528;&#x6237;&#x6240;&#x6709;&#x8BF7;&#x6C42;&#x8FC7;&#x7A0B;&#x7684;&#x76F8;&#x5E94;&#x65F6;&#x95F4;&#xFF0C;&#x5E76;&#x5728;&#x4E00;&#x5B9A;&#x6570;&#x91CF;&#x7684;&#x5E76;&#x53D1;&#x8BBF;&#x95EE;&#x4E0B;&#x91CD;&#x590D;&#x8FDB;&#x884C;&#x3002;
Siege&#x5B98;&#x65B9;&#xFF1A;<a href="http://www.joedog.org/" target="_blank">http://www.joedog.org/</a>
Siege&#x4E0B;&#x8F7D;&#xFF1A;<a href="http://www.joedog.org/pub/siege/siege-latest.tar.gz" target="_blank">http://www.joedog.org/pub/siege/siege-latest.tar.gz</a>
Siege&#x89E3;&#x538B;&#x5E76;&#x5B89;&#x88C5;&#xFF1A;</p>
<pre><code class="lang-sh">tar -zxvf siege-latest.tar.gz
<span class="hljs-built_in">cd</span> siege-latest/
./configure
make
make install
</code></pre>
<blockquote>
<p>Siege&#x4F7F;&#x7528;:</p>
</blockquote>
<pre><code class="lang-sh">siege -c 100 -r 10 <span class="hljs-_">-f</span> site.url
</code></pre>
<p>-c&#x662F;&#x5E76;&#x53D1;&#x91CF;&#xFF0C;-r&#x662F;&#x91CD;&#x590D;&#x6B21;&#x6570;&#x3002; 
url&#x6587;&#x4EF6;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#xFF0C;&#x6BCF;&#x884C;&#x90FD;&#x662F;&#x4E00;&#x4E2A;url&#xFF0C;&#x5B83;&#x4F1A;&#x4ECE;&#x91CC;&#x9762;&#x968F;&#x673A;&#x8BBF;&#x95EE;&#x7684;&#x3002;
site.url&#x5185;&#x5BB9;:</p>
<pre><code class="lang-sh">http://www.qixing318.com/
http://www.zendsns.com/
http://www.qixing.info/
</code></pre>
<p>&#x6D4B;&#x8BD5;&#x7ED3;&#x679C;:</p>
<p><img src="http://i.imgur.com/eVMBVRe.png" alt=""></p>
<p>&#x7ED3;&#x679C;&#x8BF4;&#x660E;&#xFF1A;</p>
<pre><code class="lang-sh">Transactions: 550 hits //&#x5B8C;&#x6210;550&#x6B21;&#x5904;&#x7406;
Availability: 55.00 % //55.00 % &#x6210;&#x529F;&#x7387;
Elapsed time: 31.32 secs //&#x603B;&#x5171;&#x7528;&#x65F6;
Data transferred: 1.15 MB //&#x5171;&#x6570;&#x636E;&#x4F20;&#x8F93;1.15 MB
Response time: 3.04 secs //&#x663E;&#x793A;&#x7F51;&#x7EDC;&#x8FDE;&#x63A5;&#x7684;&#x901F;&#x5EA6;
Transaction rate: 17.56 trans/sec //&#x5747;&#x6BCF;&#x79D2;&#x5B8C;&#x6210; 17.56 &#x6B21;&#x5904;&#x7406;&#xFF1A;&#x8868;&#x793A;&#x670D;&#x52A1;&#x5668;&#x540E;
Throughput: 0.04 MB/sec //&#x5E73;&#x5747;&#x6BCF;&#x79D2;&#x4F20;&#x9001;&#x6570;&#x636E;
Concurrency: 53.44 //&#x5B9E;&#x9645;&#x6700;&#x9AD8;&#x5E76;&#x53D1;&#x6570;
Successful transactions: 433 //&#x6210;&#x529F;&#x5904;&#x7406;&#x6B21;&#x6570;
Failed transactions: 450 //&#x5931;&#x8D25;&#x5904;&#x7406;&#x6B21;&#x6570;
Longest transaction: 15.50 //&#x6BCF;&#x6B21;&#x4F20;&#x8F93;&#x6240;&#x82B1;&#x6700;&#x957F;&#x65F6;&#x95F4;
Shortest transaction: 0.42 //&#x6BCF;&#x6B21;&#x4F20;&#x8F93;&#x6240;&#x82B1;&#x6700;&#x77ED;&#x65F6;&#x95F4;
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../运维相关.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 运维相关">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Web性能测试工具","level":"1.7.1","depth":2,"next":{"title":"Java 程序员眼中的 Linux","level":"1.7.2","depth":2,"url":"https://github.com/judasn/Linux-Tutorial","ref":"https://github.com/judasn/Linux-Tutorial","articles":[]},"previous":{"title":"运维相关","level":"1.7","depth":1,"path":"运维相关.md","ref":"运维相关.md","articles":[{"title":"Web性能测试工具","level":"1.7.1","depth":2,"path":"web/test_tool.md","ref":"web/test_tool.md","articles":[]},{"title":"Java 程序员眼中的 Linux","level":"1.7.2","depth":2,"url":"https://github.com/judasn/Linux-Tutorial","ref":"https://github.com/judasn/Linux-Tutorial","articles":[]},{"title":"写给java开发的运维笔记","level":"1.7.3","depth":2,"path":"learn_server/README.md","ref":"learn_server/README.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"web/test_tool.md","mtime":"2017-09-01T15:31:07.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-01T16:57:38.335Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

